package com.px.lovepath.ui.general;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

public class ViewController {
	protected final Activity mParentActivity; 
	protected final View mView;
	
	// ### 构造函数 ###
	public ViewController(Activity parentActivity, View view) {
		assert parentActivity != null;
		assert view != null;
		
		mParentActivity = parentActivity;
		mView = view;
	}
	
	// ### 属性 ###
	public Activity getParentActivity() {
		return mParentActivity;
	}
	public View getView() {
		return mView;
	}
	
	// ### 方法 ###
	public View findViewById(int viewId) {
		return mView.findViewById(viewId);
	}
	
	// ### Activity回调函数 ###
	public void onActivityCreate(Bundle savedInstanceState) {
		
	}
	public void onActivityPause() {
		
	}
	public void onActivityResume() {
		
	}
	public void onActivitySaveInstanceState(Bundle outState) {
		
	}

}
